
$('#submit').click(function(){

	var data = $('#from').serialize();

	var btn = $(this).button('loading')

	$.post("/record/create",
			data,
			function(result){
	            if(result.status == true){
	              
	                $.successAlert(result.msg);

					setTimeout(function (){window.location.href='/info'}, 3000)
	            }else{
	            	$("body").append($.errorAlert(result.msg));

	            	$.clearAlert();
	            	
					btn.button('reset')

					return false;	
	            }
	},"json");

})